<!--
 * @Author: pjji
 * @describe: demo2
 * @LastEditTime: 2022-02-11 10:25:18
-->
<template>
    <div class="container demo2">
        <van-skeleton title :row="1" :loading="loading">
            <div>我是请求的标题</div>
        </van-skeleton>
        <van-skeleton title avatar :row="3" :loading="loading">
            <div>我是请求的内容</div>
            <ul>
                <li>1213</li>
                <li>asda</li>
                <li>sdasdasdasdasda</li>
                <li>dasdasdsad</li>
                <li>asdas</li>
            </ul>
        </van-skeleton>
    </div>
</template>

<script>
import common from '@/mixins/common' //公共函数
import _ from "lodash";
export default {
    components: {},
    mixins: [common],
    data () {
        return {
            loading: false
        }
    },
    computed: {
        _API () {
            return this.$api.publicity;
        },
    },
    methods: {
        goBack() {
            alert('我是自定义返回事件！')
            return
        }
    },
    mounted () {
        this.$bus.$on('bus-goBack', this.goBack)
    },
    beforeDestroy () {
        this.$bus.$off('bus-goBack', this.goBack)
    },
    created () {
        this.loading = true
        setTimeout(() => {
            this.loading = false
        }, 2000)
    }
}
</script>

<style lang="scss" scoped>
.demo2 {
    font-size: 24px;
    background: #fff;
}
</style>
